From: Dan Winship Date: Fri, 7 Jan 2011 16:59:20 +0000 (-0500) Subject: messageTray: use alignment rather than gravity to position the summary X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~9306 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=4c4a703e6394fbf503e3291b415228318dc4b30d;p=gnome-shell.git messageTray: use alignment rather than gravity to position the summary Actors in clutter are supposed to be re-allocated with Clutter.AllocationFlags.ABSOLUTE_ORIGIN_CHANGED if they move relative to the screen, even if they don't move relative to their parent. Currently this does not work correctly for actors inside containers with non-northwest gravity. This is probably a fixable bug, but gravity has messed up other things in the past too, so let's just not use it. This change ensures that summary trayicons are re-allocated when the summary animates, and is part of the fix for https://bugzilla.gnome.org/show_bug.cgi?id=635695 --- diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js index 359327418..04a968b56 100644 --- a/js/ui/messageTray.js +++ b/js/ui/messageTray.js @@ -916,7 +916,7 @@ MessageTray.prototype = { this._notification = null; this._notificationClickedId = 0; - this._summaryBin = new St.Bin({ anchor_gravity: Clutter.Gravity.NORTH_EAST }); + this._summaryBin = new St.Bin({ x_align: St.Align.END }); this.actor.add_actor(this._summaryBin); this._summary = new St.BoxLayout({ name: 'summary-mode', reactive: true, @@ -1008,9 +1008,8 @@ MessageTray.prototype = { this.actor.width = primary.width; this._notificationBin.x = 0; this._notificationBin.width = primary.width; - - // These work because of their anchor_gravity - this._summaryBin.x = primary.width; + this._summaryBin.x = 0; + this._summaryBin.width = primary.width; }, contains: function(source) {